package pers.books.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import pers.books.service.PressService;
import pers.books.util.ResultMessage;

/**
 * 
 * PressController
 *
 * @author 姜治昊
 * @time 2018年5月5日 下午11:25:14
 */
@RestController
@RequestMapping("press")
public class PressController {
	
	@Autowired
	private PressService pressService;
	
	/**
	 * 
	 * @param nameLike
	 * @param page
	 * @param rows
	 * @return
	 */
	@RequestMapping(value="getall", method=RequestMethod.POST)
	public ResultMessage<?> getAllPresses(
			@RequestParam(value="nameLike", required=false, defaultValue="")String nameLike, int page, int rows) {
		return pressService.getAllPresses(nameLike, page, rows);
	}

}
